<template>
    <div class="desc-container">
        <h3 class="desc-title">{{ info.title }}</h3>
        <hr>
        <div class="desc-content" v-html="info.content">

        </div>
    </div>
</template>
<script>
export default {
    data(){
        return{
            id:this.$route.params.id,
            info:{} //商品图文介绍数据
        }
    },
    created(){
        this.getinfo()
    },
    methods:{
        getinfo(){
            this.$http.get('api/goods/getdesc/'+this.id).then(result =>{
                if(result.body.status === 0){
                    this.info = result.body.message[0]
                }
            })
        }
    }
}
</script>
<style lang="scss">
.desc-container{
    .desc-title{
        color: #226aff;
        font-size: 18px;
        text-align: center;
        margin: 15px 0;
    }
    .desc-content{
        img{
            width: 100%;
        }
    }
}
</style>
